home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="html" version="4.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
- <xsl:template match="/wipereport">
- <table width="100%" border="0">
- <!-- Hdd Info -->
- <xsl:apply-templates select="hddinfo"/>
- <!-- General Info -->
- <xsl:apply-templates select="operation"/>
- <!-- Algorithm Info -->
- <xsl:apply-templates select="algorithm"/>
- <!-- Bad Blocks Info -->
- <xsl:apply-templates select="badblocks"/>
- </table>
- </xsl:template>
- <xsl:template match="hddinfo">
- <tr>
- <td colspan="2">
- <nobr>
- <h2>QT_TRANSLATE_NOOP("QObject", "Hard Disk Info")</h2>
- </nobr>
- </td>
- </tr>
- <tr>
- <td valign="center" colspan="2">
- <img src="hline_gray"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Hard Disk")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="name"/>
- </td>
- </tr>
- <xsl:if test="string-length(serial) != 0">
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Serial Number")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="serial"/>
- </td>
- </tr>
- </xsl:if>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Capacity")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="capasity"/>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="operation">
- <tr>
- <td colspan="2"/>
- </tr>
- <tr>
- <td colspan="2">
- <nobr>
- <h2>QT_TRANSLATE_NOOP("QObject", "General Info")</h2>
- </nobr>
- </td>
- </tr>
- <tr>
- <td valign="center" colspan="2">
- <img src="hline_gray"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Object")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="object"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Free Space Only")</b>
- </nobr>
- </td>
- <td>
- <xsl:choose>
- <xsl:when test="object/@onlyFreeSpace=1">QT_TRANSLATE_NOOP("QObject", "Yes")</xsl:when>
- <xsl:otherwise>QT_TRANSLATE_NOOP("QObject", "No")</xsl:otherwise>
- </xsl:choose>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Start Time")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="starttime"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "End Time")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="finishtime"/>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="algorithm">
- <tr>
- <td colspan="2"/>
- </tr>
- <tr>
- <td colspan="2">
- <nobr>
- <h2>QT_TRANSLATE_NOOP("QObject", "Algorithm Info")</h2>
- </nobr>
- </td>
- </tr>
- <tr>
- <td valign="center" colspan="2">
- <img src="hline_gray"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Name")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="name"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Description")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="description"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Write Pass Count")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="writepass"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Verify Pass Count")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="verifypass"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Verify Percent")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="verifyPercent"/>
- </td>
- </tr>
- </xsl:template>
- <xsl:template match="badblocks">
- <tr>
- <td colspan="2"/>
- </tr>
- <tr>
- <td colspan="2">
- <nobr>
- <h2>QT_TRANSLATE_NOOP("QObject", "Bad Blocks Info")</h2>
- </nobr>
- </td>
- </tr>
- <tr>
- <td valign="center" colspan="2">
- <img src="hline_gray"/>
- </td>
- </tr>
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "Total Bad Blocks")</b>
- </nobr>
- </td>
- <td>
- <xsl:value-of select="count"/>
- </td>
- </tr>
- <xsl:variable name="badblocks" select="list/badblock"/>
- <xsl:choose>
- <xsl:when test="count($badblocks) > 0">
- <tr>
- <td>
- <nobr>
- <b>QT_TRANSLATE_NOOP("QObject", "List")</b>
- </nobr>
- </td>
- <td>
- <xsl:call-template name="badblocklist">
- <xsl:with-param name="badblocks" select="$badblocks"/>
- </xsl:call-template>
- </td>
- </tr>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="badblocklist">
- <xsl:param name="badblocks"/>
- <xsl:choose>
- <xsl:when test="count($badblocks) > 1">
- <xsl:variable name="head" select="$badblocks[1]"/>
- <xsl:variable name="tail">
- <xsl:call-template name="badblocklist">
- <xsl:with-param name="badblocks" select="$badblocks[position() != 1]"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:choose>
- <xsl:when test="$tail">
- <xsl:value-of select="concat($head, ', ', $tail)"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$head"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- <xsl:when test="count($badblocks) = 1">
- <xsl:value-of select="$badblocks[1]"/>
- </xsl:when>
- </xsl:choose>
- </xsl:template>
- </xsl:stylesheet>
-